<?php /* Smarty version Smarty-3.0.7, created on 2011-07-27 11:04:28
         compiled from "components/btngrid\btngrid.tpl" */ ?>
<?php /*%%SmartyHeaderCode:324434e2fd49c914cd3-59938698%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '8e63acf39117483890b210a90b146ab7748a26b6' => 
    array (
      0 => 'components/btngrid\\btngrid.tpl',
      1 => 1311757459,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '324434e2fd49c914cd3-59938698',
  'function' => 
  array (
  ),
  'has_nocache_code' => false,
)); /*/%%SmartyHeaderCode%%*/?>
<?php if (!$_smarty_tpl->getVariable('list')->value['ajax']){?>
<div id="<?php echo $_smarty_tpl->getVariable('list')->value['name'];?>
_btngrid" class="filterwrapper">
	<input type="hidden" id="<?php echo $_smarty_tpl->getVariable('list')->value['name'];?>
_btngrid_id"/>
	<div class="filtertitle"><?php echo $_smarty_tpl->getVariable('list')->value['comptitle'];?>
</div>
	<div id="<?php echo $_smarty_tpl->getVariable('list')->value['name'];?>
_btngrid_body">
<?php }?>
	<table width="800px">
		<tr>
			<td>
				<?php if (count($_smarty_tpl->getVariable('btns')->value)>0){?>Add relationship: <?php }?>
				<?php  $_smarty_tpl->tpl_vars['btn'] = new Smarty_Variable;
 $_from = $_smarty_tpl->getVariable('btns')->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
if ($_smarty_tpl->_count($_from) > 0){
    foreach ($_from as $_smarty_tpl->tpl_vars['btn']->key => $_smarty_tpl->tpl_vars['btn']->value){
?>
					<input type="button" value="<?php echo $_smarty_tpl->tpl_vars['btn']->value['value'];?>
" onclick="<?php echo $_smarty_tpl->getVariable('list')->value['name'];?>
_btngrid.rowClick(null, null, <?php echo $_smarty_tpl->tpl_vars['btn']->value['id'];?>
);"/>
				<?php }} ?>
			</td>
		</tr>
		<tr>
			<td>
				<div class="scrolldiv">
					<table id="<?php echo $_smarty_tpl->getVariable('list')->value['name'];?>
_btngrid_tbl" name="<?php echo $_smarty_tpl->getVariable('list')->value['name'];?>
_tbl" class="filtertable">
						<thead>
							<tr>
								<th width="110"><?php echo $_smarty_tpl->getVariable('list')->value['lblpartnerrel'];?>
</th>
								<th><?php echo $_smarty_tpl->getVariable('list')->value['lblname'];?>
</th>
							</tr>
						</thead>
						<tbody id="<?php echo $_smarty_tpl->getVariable('list')->value['name'];?>
_btngrid_tbl_body">
							<?php $_smarty_tpl->tpl_vars['i'] = new Smarty_variable(0, null, null);?>
							<?php  $_smarty_tpl->tpl_vars['row'] = new Smarty_Variable;
 $_from = $_smarty_tpl->getVariable('rows')->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
if ($_smarty_tpl->_count($_from) > 0){
    foreach ($_from as $_smarty_tpl->tpl_vars['row']->key => $_smarty_tpl->tpl_vars['row']->value){
?>
								<tr id="<?php echo $_smarty_tpl->getVariable('list')->value['name'];?>
_btngrid_tr_<?php echo $_smarty_tpl->getVariable('i')->value;?>
" height="15px" onclick="<?php echo $_smarty_tpl->getVariable('list')->value['name'];?>
_btngrid.rowClick(this, <?php echo $_smarty_tpl->tpl_vars['row']->value['id'];?>
);" class="highlightrow">
									<td><?php echo $_smarty_tpl->tpl_vars['row']->value['partnerreltype'];?>
</td>
									<td><?php echo $_smarty_tpl->tpl_vars['row']->value['partnername'];?>
</td>
									<!--td><?php echo $_smarty_tpl->tpl_vars['row']->value['params'];?>
</td-->
								</tr>
								<?php $_smarty_tpl->tpl_vars['i'] = new Smarty_variable($_smarty_tpl->getVariable('i')->value+1, null, null);?>
							<?php }} ?>
						</tbody>
					</table>
				</div>
			</td>
		</tr>
		<tr>
			<td id="<?php echo $_smarty_tpl->getVariable('list')->value['name'];?>
_btngrid_params" colspan="3">
				<?php echo $_smarty_tpl->getVariable('list')->value['params'];?>

			</td>
		</tr>
	</table>
<?php if (!$_smarty_tpl->getVariable('list')->value['ajax']){?>
	</div>
</div>
<script language="javascript">
	var <?php echo $_smarty_tpl->getVariable('list')->value['name'];?>
_btngrid = new BtnGrid("<?php echo $_smarty_tpl->getVariable('list')->value['name'];?>
");
	//ScrollableTable ($("<?php echo $_smarty_tpl->getVariable('list')->value['name'];?>
_btngrid_tbl"), ((Math.min(4, <?php echo count($_smarty_tpl->getVariable('rows')->value);?>
))*23)+27, 800, 4);
</script>
<?php }?>
